<#include "formBuilder.ftl" />

	<h1>${form.label}: ${model}</h1>
	
	<div class="spacer" ></div>

	<@pageErrors />

	<@s.form action="${request.contextPath}${controllerPath}/${id}" method="POST" cssClass="cmxform" theme="simple" validate="true">
		<input type="hidden" name="_method" value="PUT" />
		<input type="hidden" name="decorator" value="${decorator}" />
		<@buildForm />
		<@s.submit value="update" />
		<#if modal>
			<input type="button" value="cancel" onclick="parent.tb_remove();" />
		<#else>
			<input type="button" value="delete" onclick="if(confirm('Are you sure you want to delete this ${frm.label}?')) window.location='${request.contextPath}${controllerPath}/${id}?_method=DELETE'" />
			<input type="button" value="cancel" onclick="window.location='${request.contextPath}${controllerPath}'" />
		</#if>
	</@s.form>
